Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

readable-web-to-node-stream

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

readable-web-to-node-stream

Converts a Web-API readable-stream into a Node readable-stream.

  • 1.1.4
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created

What is readable-web-to-node-stream?

The readable-web-to-node-stream package provides a way to convert web streams (ReadableStream) into Node.js streams (Readable). This is particularly useful for working with web APIs in a Node.js environment, allowing seamless integration between web and Node.js stream ecosystems.

What are readable-web-to-node-stream's main functionalities?

Convert Web ReadableStream to Node.js Readable Stream

This feature allows you to convert a web ReadableStream obtained from a fetch request into a Node.js Readable stream. The code sample demonstrates fetching data from a URL and converting the response body into a Node.js stream, which can then be used with Node.js stream APIs.

const { ReadableWebToNodeStream } = require('readable-web-to-node-stream');

async function fetchAndConvert(url) {
  const response = await fetch(url);
  const webStream = response.body;
  const nodeStream = new ReadableWebToNodeStream(webStream);
  nodeStream.on('data', chunk => {
    console.log('Received chunk:', chunk);
  });
}

fetchAndConvert('https://example.com');

Other packages similar to readable-web-to-node-stream

Keywords

FAQs

Package last updated on 21 May 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc